home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 98 / Skunkware 98.iso / src / net / bind-contrib.tar.gz / bind-contrib.tar / contrib / host / Makefile < prev    next >
Encoding:
Makefile  |  1996-11-10  |  6.4 KB  |  229 lines

  1. #    @(#)Makefile            e07@nikhef.nl (Eric Wassenaar) 961012
  2.  
  3. # ----------------------------------------------------------------------
  4. # Adapt the installation directories to your local standards.
  5. # ----------------------------------------------------------------------
  6.  
  7. # This is where the host executable will go.
  8. DESTBIN = /usr/local/bin
  9.  
  10. # This is where the host manual page will go.
  11. DESTMAN = /usr/local/man
  12.  
  13. BINDIR = $(DESTBIN)
  14. MANDIR = $(DESTMAN)/man1
  15.  
  16. # ----------------------------------------------------------------------
  17. # Special compilation options may be needed only on a few platforms.
  18. # See also the header file port.h for portability issues.
  19. # ----------------------------------------------------------------------
  20.  
  21. #if defined(_AIX)
  22. SYSDEFS = -D_BSD -D_BSD_INCLUDES -U__STR__ -DBIT_ZERO_ON_LEFT
  23. #endif
  24.  
  25. #if defined(SCO) && You have either OpenDeskTop 3 or OpenServer 5
  26. SYSDEFS = -DSYSV
  27. #endif
  28.  
  29. #if defined(ultrix) && You are using the default ultrix <resolv.h>
  30. SYSDEFS = -DULTRIX_RESOLV
  31. #endif
  32.  
  33. #if defined(solaris) && You do not want to use BSD compatibility mode
  34. SYSDEFS = -DSYSV
  35. #endif
  36.  
  37. #if defined(solaris) && You are using its default broken resolver library
  38. SYSDEFS = -DNO_YP_LOOKUP
  39. #endif
  40.  
  41. SYSDEFS =
  42.  
  43. # ----------------------------------------------------------------------
  44. # Configuration definitions.
  45. # See also the header file conf.h for more configuration definitions.
  46. # ----------------------------------------------------------------------
  47.  
  48. #if defined(BIND_48) && You want to use the default bind res_send()
  49. CONFIGDEFS = -DBIND_RES_SEND
  50. #endif
  51.  
  52. #if defined(BIND_49) && You want to use the special host res_send()
  53. CONFIGDEFS = -DHOST_RES_SEND
  54. #endif
  55.  
  56. # This is the default in either case if you compile stand-alone.
  57. CONFIGDEFS = -DHOST_RES_SEND
  58.  
  59. # ----------------------------------------------------------------------
  60. # Include file directories.
  61. # This program must be compiled with the same include files that
  62. # were used to build the resolver library you are linking with.
  63. # ----------------------------------------------------------------------
  64.  
  65. INCL = ../../include
  66. INCL = .
  67.  
  68. COMPINCL = ../../compat/include
  69. COMPINCL = .
  70.  
  71. INCLUDES = -I$(INCL) -I$(COMPINCL)
  72.  
  73. # ----------------------------------------------------------------------
  74. # Compilation definitions.
  75. # ----------------------------------------------------------------------
  76.  
  77. DEFS = $(CONFIGDEFS) $(SYSDEFS) $(INCLUDES)
  78.  
  79. COPTS =
  80. COPTS = -O
  81.  
  82. CFLAGS = $(COPTS) $(DEFS)
  83.  
  84. # Select your favorite compiler.
  85. CC = /usr/ucb/cc            #if defined(solaris) && BSD
  86. CC = /bin/cc -arch m68k -arch i386    #if defined(next)
  87. CC = /bin/cc -Olimit 1000        #if defined(ultrix)
  88. CC = /bin/cc
  89. CC = cc
  90.  
  91. # ----------------------------------------------------------------------
  92. # Linking definitions.
  93. # libresolv.a should contain the resolver library of BIND 4.8.2 or later.
  94. # Link it in only if your default library is different.
  95. # SCO keeps its own default resolver library inside libsocket.a
  96. #
  97. # lib44bsd.a contains various utility routines, and comes with BIND 4.9.*
  98. # You may need it if you link with the 4.9.* resolver library.
  99. #
  100. # libnet.a contains the getnet...() getserv...() getproto...() calls.
  101. # It is safe to leave it out and use your default library.
  102. # With BIND 4.9.3 the getnet...() calls are in the resolver library.
  103. # ----------------------------------------------------------------------
  104.  
  105. RES = -lsocket                #if defined(SCO) && default
  106. RES =
  107. RES = ../../res/libresolv.a
  108. RES = -lresolv
  109.  
  110. COMPLIB = ../../compat/lib/lib44bsd.a
  111. COMPLIB = -lnet
  112. COMPLIB =
  113.  
  114. LIBS = -lsocket -lnsl            #if defined(solaris) && not BSD
  115. LIBS =
  116.  
  117. LIBRARIES = $(RES) $(COMPLIB) $(LIBS)
  118.  
  119. LDFLAGS =
  120.  
  121. # ----------------------------------------------------------------------
  122. # Compatibility for compilation via the BIND master Makefile.
  123. # ----------------------------------------------------------------------
  124.  
  125. # redefined by bind
  126. CDEBUG = $(COPTS) $(CONFIGDEFS)
  127. CDEFS = $(SYSDEFS) $(INCLUDES)
  128. CFLAGS = $(CDEBUG) $(CDEFS)
  129.  
  130. # ----------------------------------------------------------------------
  131. # Miscellaneous definitions.
  132. # ----------------------------------------------------------------------
  133.  
  134. MAKE = make $(MFLAGS)
  135.  
  136. # This assumes the BSD install.
  137. INSTALL = install -c
  138.  
  139. # Grrr
  140. SHELL = /bin/sh
  141.  
  142. # ----------------------------------------------------------------------
  143. # Files.
  144. # ----------------------------------------------------------------------
  145.  
  146. PROG = host
  147. HDRS = port.h conf.h exit.h type.h rrec.h defs.h
  148. SRCS = host.c send.c vers.c
  149. OBJS = host.o send.o vers.o
  150. MANS = host.1
  151. DOCS = RELEASE_NOTES
  152.  
  153. UTILS = nslookup mxlookup
  154. MISCS = malloc.c
  155.  
  156. FILES = Makefile $(DOCS) $(HDRS) $(SRCS) $(MANS) $(UTILS) $(MISCS)
  157.  
  158. PACKAGE = host
  159. TARFILE = $(PACKAGE).tar
  160.  
  161. CLEANUP = $(PROG) $(OBJS) $(TARFILE) $(TARFILE).Z
  162.  
  163. # ----------------------------------------------------------------------
  164. # Rules for installation.
  165. # ----------------------------------------------------------------------
  166.  
  167. all: $(PROG)
  168.  
  169. $(OBJS): $(SRCS) $(HDRS)
  170.  
  171. $(PROG): $(OBJS)
  172.     $(CC) $(LDFLAGS) -o $(PROG) $(OBJS) $(LIBRARIES)
  173.  
  174. install: $(PROG)
  175.     $(INSTALL) -m 755 -s $(PROG) $(BINDIR)
  176.  
  177. man: $(MANS)
  178.     $(INSTALL) -m 444 host.1 $(MANDIR)
  179.  
  180. clean:
  181.     rm -f $(CLEANUP) *.o a.out core
  182.  
  183. # ----------------------------------------------------------------------
  184. # host may be called with alternative names, querytype names and "zone".
  185. # A few frequently used abbreviations are handy.
  186. # ----------------------------------------------------------------------
  187.  
  188. ABBREVIATIONS = a ns cname soa wks ptr hinfo mx txt    # standard
  189. ABBREVIATIONS = mb mg mr minfo                # deprecated
  190. ABBREVIATIONS = md mf null                # obsolete
  191. ABBREVIATIONS = rp afsdb x25 isdn rt nsap nsap-ptr    # new
  192. ABBREVIATIONS = sig key px gpos aaaa loc nxt srv    # very new
  193. ABBREVIATIONS = eid nimloc atma naptr            # draft
  194. ABBREVIATIONS = uinfo uid gid unspec            # nonstandard
  195. ABBREVIATIONS = maila mailb any                # filters
  196.  
  197. ABBREVIATIONS = mx ns soa zone
  198.  
  199. links:
  200.     for i in $(ABBREVIATIONS) ; do \
  201.         (cd $(BINDIR) ; ln -s $(PROG) $$i) ; \
  202.     done
  203.  
  204. # ----------------------------------------------------------------------
  205. # Rules for maintenance.
  206. # ----------------------------------------------------------------------
  207.  
  208. lint:
  209.     lint $(DEFS) $(SRCS)
  210.  
  211. alint:
  212.     alint $(DEFS) $(SRCS)
  213.  
  214. llint:
  215.     lint $(DEFS) $(SRCS) -lresolv
  216.  
  217. print:
  218.     lpr -J $(PACKAGE) -p Makefile $(DOCS) $(HDRS) $(SRCS)
  219.  
  220. dist:
  221.     tar cf $(TARFILE) $(FILES)
  222.     compress $(TARFILE)
  223.  
  224. depend:
  225.     mkdep $(DEFS) $(SRCS)
  226.  
  227. # DO NOT DELETE THIS LINE -- mkdep uses it.
  228. # DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
  229.